/****************************************************************************
* FILE NAME			: UclDefine.h
* Product			: Universal Communication Library
* VERSION			: 1.0
* AUTHOR			: Pankaj_v1
* CREATED ON		: 3rd May. 2001

* DESCRIPTION		: Header file for all # defines for Ucl.
						
*						 
* NOTES				
* CHANGE RECORD		:									
* DATE							CHANGED BY                      CHANGE DETAILS
*---------------------------------------------------------------------------
* 03-Mar-2001			Pankaj_V1		Initial draft
* 17-May-2001			Prabha_R1       Modified the defines for Modem states 
*										to be in a different range from the  
*										modem responses
* 28-May-2001           Ravi_B3         Defines for Modem responses are modified
*                                       to be different from other libraries 
* 19-June-2001			Prabha_R1		Added LINE_STATUS for supporting line checking
* 24-July-2001          Ravi_B3         Defines for Mobitex Communication are added
* 14-April-2005         Pankaj_v1       Added COM_ETH1 port and changed MAX_PORTS value
* 12-June-2005			Pankaj_v1		Added # defines for UCL timeouts
* 05-Aug-2005			Pankaj_v1		Added # defines for UCL timeouts for GPRS, CDMA
                                        CO Ethernet and WiFi
* 05-Aug-2005			Pankaj_v1		Added COM_WLN1 port and changed MAX_PORTS value

* 23-may-2006           Mamatha.M.B     Added new error values to handle different error 
                                        conditions while registering to network
                                        
****************************************************************************/

/******************************************************************
   Copyright (C) 2001-2002 by VeriFone Inc. All rights reserved.

 No part of this software may be used, stored, compiled, reproduced,
 modified, transcribed, translated, transmitted, or transferred, in
 any form or by any means  whether electronic, mechanical,  magnetic,
 optical, or otherwise, without the express prior written permission
                          of VeriFone, Inc.
*******************************************************************/


#ifndef __UCLDEFINE_H
#define __UCLDEFINE_H

#define     INFO_LOGS                0X00010000  // paramter values passed from the application
#define     LEVEL_2_LOGS             0X00020000  // AT command responses, other function return values
#define     LEVEL_3_LOGS             0X00040000 // detailed logs which delineates the function entry and exits
#define     ERROR_LOGS               0X00080000 // Error reports
#define		TEMPLATE_LL_RSRC	1001
#define		LAND				1002
#define		TEMPLATE_GSM_RSRC	1003
#define		GSM_RSRC_ID			1004
#define		TEMPLATE_GPRS_RSRC	1003
#define		GPRS_RSRC_ID		1004
#define		TEMPLATE_CDMA_RSRC	1005
#define		CDMA_RSRC_ID		1006
#define		TEMPLATE_ISDN_RSRC	1007
#define		ISDN_RSRC_ID		1008

#define     MAX_PORTS            11

#define		COM1			     0
#define		COM2			     1
#define		COM3			     2
#define		COM4			     3
#define		COM5			     4
#define		COM_ETH1		     5
#define		COM_WLN1		     6
#define          COM6                        7
#define          USBD			     8
#define          COM8                        9
#define		USBSER			    10

//Jennifer_S2		//added for V510 GPRS
#define		TERMTYPE_510G		"USBD"
#define		MODELNUM_510G	"V510G"

// Modem AT command result set


	
#define		UCL_RINGBACK_DETECTED			     9
#define		UCL_CALLER_ID_MARK_DETECTED        	 30
#define		HOOKSWITH_FLASH_DETECTED      	     31
#define		UK_CID_STATE_TONE_ALERT_SIGNAL_DETECTED 32
#define		OVERCURRENT_CONDITION        		 33
#define		BLACKLIST_FULL         				 40
#define		ATTEMPTED_NUMBER_BLACKLISTED         41
#define		NO_PHONE_LINE_PRESENT         		 42	
#define		TELEPHONE_LINE_IN_USE         		 43
#define		POLARITY_REVERSAL_DETECTED         	 44
#define		POLARITY_REVERSAL_NOT_DETECTED       45
		
#define		UCL_CONNECT_56000         			 52
#define		UCL_CONNECT_32000         			 60
#define		UCL_CONNECT_48000         			 61
#define		UCL_CONNECT_28000         			 63
#define		UCL_CONNECT_29333        			 64
#define		UCL_CONNECT_30666         			 65
#define		UCL_CONNECT_33333         			 66
#define		UCL_CONNECT_34666         			 67
#define		UCL_CONNECT_36000         			 68
#define		UCL_CONNECT_37333         			 69
#define		NO_PROTOCOL               			 70
#define		LINK_ESTABLISHED_AT_75    			 75
#define		V42_PROTOCOL              			 77
#define		V42bIS_PROTOCOL           			 79
#define		MNP2_PROTOCOL             			 80
#define		MNP3_PROTOCOL             			 81	
#define		MNP4_PROTOCOL             			 82
#define		MNP5_PROTOCOL             			 83
#define		UCL_CONNECT_38666          			 90
#define		UCL_CONNECT_40000         			 91
#define		UCL_CONNECT_41333         			 92
#define		UCL_CONNECT_42666         			 93
#define		UCL_CONNECT_44000         			 94
#define		UCL_CONNECT_45333					 95
#define		UCL_CONNECT_46666         			 96
#define		UCL_CONNECT_49333         			 97
#define		UCL_CONNECT_50666         			 98
#define		UCL_CONNECT_52000         			 99
#define		UCL_CONNECT_53333         			100
#define		UCL_CONNECT_54666         			101
#define		DTMF_DIAL_ATTEMPTED_PULSE_DIAL_ONLY 102

#define 	UCL_OK	  				0
#define 	UCL_CONNECT_SUCCESS		1
#define 	UCL_RING  				2
#define		UCL_NO_CARRIER			3
#define		UCL_NO_DIAL_TONE		4
#define		UCL_BUSY  				5
#define		UCL_NO_ANSWER  			6       
#define		UCL_CONNECT_16800               200
#define		UCL_CONNECT_300			7  	// Connect 300
#define		UCL_CONNECT_1200		8  	// Connect 1200
#define		UCL_CONNECT_600			9  	// Connect 600 
#define		UCL_CONNECT_2400		10  // Connect 2400
#define		UCL_CONNECT_4800		11	// Connect 4800
#define 	UCL_CONNECT_9600		12	// Connect 9600
#define		UCL_CONNECT_7200		13	// Connect 7200
#define		UCL_CONNECT_12000		14	// Connect 12000
#define		UCL_CONNECT_14400  		15	// Connect 14400
#define		UCL_CONNECT_19200  		16	// Connect 19200
#define		UCL_CONNECT_21600		18	// Connect 21600
#define		UCL_CONNECT_24000		19	// Connect 24000
#define		UCL_CONNECT_26400		20  // Connect 26400
#define		UCL_CONNECT_28800		21  // Connect 28800
#define		UCL_CONNECT_31200		22  // Connect 31200
#define		UCL_CONNECT_33600		23  // Connect 33600
#define 	UCL_CONNECT_38400		25  // Connect 38400
#define		UCL_CONNECT_57600	  	26  // Connect 57600
#define		UCL_CONNECT_115200  	27  // Connect 115200
#define		UCL_CONNECT_64000		28 // camillee_y1: added for ISDN connect 64000
#define		UCL_RINGING				29 

#define		UCL_NO_LINE				90
#define     UCL_TEL_TRUNK_BUSY		94
#define		UCL_LINE_OK				0

#define		UCL_SUCCESS				0
#define		UCL_FAILURE				-1


//#define		TRUE				1
#define     FALSE				    0


//Two modes of the mode data and command
#define		DATA_MODE				1
#define		COMMAND_MODE			0

//Bluetooth modes of the data and command
#define		BT_LOCAL_COMMAND_MODE		0
#define		BT_REMOTE_COMMAND_MODE		1
#define		BT_DATA_MODE				2

#define		NO_OUTPUT_PENDING		0


#define		E_UCL_INVALID			-1

// Range used for returning errors is between -700 and -799.
//added By mamatha to handle different error conditions while registering to network

#define 		E_UCL_KMIP_BAD_LENGTH			-781
#define 		E_UCL_KMIP_BAD_PARAM			-780
#define 		E_UCL_KMIP_BAD_COMMAND			-779
#define 		E_UCL_UART_SWITCH_FAILURE		-778
#define 		E_UCL_CRC_MISMATCH			-777
#define 		E_UCL_NO_REPONSE				-776
#define 		E_UCL_CDMA_PROVISION_FAILED		-775 //added by Veerendra on 14-Feb-2008 for ProvisionCDMAModule()
#define 		E_UCL_AKEY_UPDATE_FAILED		-774	//added by Veerendra on 14-Feb-2008 for ProgramAKey()

//Added to handle Bluetooth Errors
#define 		E_UCL_BT_OPEN_PAIRFILE			-761
#define 		E_UCL_BT_NOT_OPENED			-762
#define 		E_UCL_BT_NOT_CONNECTED			-763
#define 		E_UCL_BT_CONNECTED			-764
#define 		E_UCL_BT_RESP_ERROR			-765
#define 		E_UCL_BT_CONN_FAILURE			-766
#define 		E_UCL_BT_INV_ADDRESS			-767
#define 		E_UCL_BT_IDX_NOT_PAIRED			-768
#define 		E_UCL_BT_IDX_NOT_SEARCHED		-769
#define 		E_UCL_BT_PAIRED_DEVICES_FULL		-770
#define 		E_UCL_BT_NOT_DIONE_BASE			-771
//#define		E_UCL_BT_PIN_COMPUTE			-772
//#define 		E_UCL_BT_INVALID_ID				-773
//#define		E_UCL_BT_NO_CARRIER			-766

#define E_UCL_PORT_IN_USE  -760
#define E_UCL_UNABLETOLOG_ANYNETWORK  -759
#define  E_UCL_NOSIM_INVALIDPINPLMN       -758
#define     E_UCL_PACKET_INCORRECT      -757
#define     E_UCL_NW_DIE                -756
#define     E_UCL_COMM_FAILURE          -755
#define     E_UCL_RECVBUFF_FULL         -754
#define     E_UCL_RECV_NACK             -753
#define     E_UCL_INVALID_PACKET        -752
#define     E_UCL_NW_LOST               -751
#define     E_UCL_NO_ACK                -750
#define		E_UCL_NOT_REGISTERED		-746
#define		E_UCL_NO_PDPCONTEXT			-745
#define		E_UCL_NO_SIGNAL				-744

#define		E_UCL_NO_COVERAGE			-743
#define		E_UCL_LOW_SIGNAL			-742
#define		E_UCL_LOW_BATTERY			-741

#define		E_UCL_CTS_LOW				-740
#define     E_UCL_PORT_OCCUPIED         -739
#define		E_UCL_LINE_IN_USE			-738
#define		E_UCL_RESFILE				-737
#define		E_UCL_INTERCHAR_TIMEOUT		-736
#define		E_UCL_CLOSE_FAIL			-735
#define		E_UCL_TEL_TRUNK_BUSY		-734
#define		E_UCL_NO_DIAL_TONE			-733
#define		E_UCL_ALREADY_OPEN			-732
#define		E_UCL_RESPCODE_NOT_FOUND	-731
#define		E_UCL_NOT_DIALED			-729
#define		E_UCL_FEATURE_NOT_SUPPORTED -728
#define		E_UCL_INSUFFICIENT_DATA		-727
#define		E_UCL_CANCEL				-726
#define		E_UCL_NO_ANSWER				-725
#define		E_UCL_PORT_REINIT			-724
#define		E_UCL_SDLC_PARM_NOTSET		-723
#define		E_UCL_NOT_DISCONNECTED		-722
#define		E_UCL_INVALID_ID			-721
#define 	E_UCL_INSUFFICIENT_SIZE		-720
#define		E_UCL_OPEN_RESFILE			-719
#define    	E_UCL_WRITE_FAILED			-718
#define		E_UCL_TIMEOUT				-717
#define		E_UCL_INVALID_MODULE		-716
#define		E_UCL_INCOMPATIBLE_DEVICE	-715
#define		E_UCL_DEVICE_NOT_RESPONDING	-714

#define		E_UCL_NOT_OPEN				-713
#define		E_UCL_NOT_CONNECTED			-712
#define     E_UCL_INPUT_PENDING			-711
#define		E_UCL_OUTPUT_PENDING		-710
#define		E_UCL_PORT_OPEN				-709
#define     E_UCL_CLOSED				-708
#define		E_UCL_INVALID_PARM			-707
#define		E_UCL_BUSY					-706
#define		E_UCL_NO_CARRIER			-705
#define		E_UCL_NO_LINE				-704
#define		E_UCL_PORT_INIT				-703
#define		E_UCL_DIAL_TYPE				-702
#define		E_UCL_ERROR					-701
#define E_UCL_NO_MEMORY   -769
#define         E_UCL_NW_DEREGISTER_FAILED          -770    
#define         E_UCL_NO_GLAIN                             -771
#define         E_UCL_NO_PREVIOUS_OPER_CODE                    -772
#define        E_UCL_NO_OPER_CODE                          -773
#define        E_UCL_OPER_SELECTION_FAILED         -774


// Modem States
#define		CLOSED						101
#define		OPENED						102
#define		CONNECTED					103
#define		DISCONNECTED				104
#define		DIALING						105
#define		RINGING						106
#define	    READY_TO_COMMUNICATE        107

//BT base station types
#define  BT_DEV_SILABS  					1
#define  BT_DEV_SM1035  					2
#define  BT_DEV_LANG4   					3
#define  BT_DEV_COMBO_LANG4_SILABS 	4
#define  BT_DEV_RS232 					5
#define  BT_DEV_UNKNOWN 				0

// BT Base station Combo Type
#define  DUAL_LAN	1
#define  DUAL_LL		2

//Four Bluetooth module states
#define  BT_CLOSED       	108
#define  BT_OPENED       	109
#define  BT_CONNECTED    110

#define		PULSE				30
#define		TONE				31
#define		BLIND				32

// SINGLEPORT is for the modem which have single line for sending data as well as command
// DOUBLEPORT is for the modem which have two seperate lines(internally) for sending data and command
#define		SINGLE_PORT            33
#define		DUAL_PORT              34

#define		DEFAULT				   35	

#define		STATUS_DOCKED		    0
#define		STATUS_UNDOCKED			1
#define		STATUS_INITRADIO		2
#define		STATUS_DIAL				3
#define		STATUS_REG				4
#define		STATUS_ATTACH			5
#define		STATUS_RECV				6
#define          STATUS_REGISTERING             7
#define           STATUS_ATTACHING               8
#define        PDP_CONTEXT_ACTIVATING      9
#define        PDP_CONTEXT_ACTIVATED      10



//Configuration Parameters ID, 
#define		MODEL_NO			    40
#define		BAUDRATE		    	41
#define		FORMAT			    	42
#define		PROTOCOL		    	43
#define		SDLC_PARM_OPTION      	44
#define		SDLC_PARM_ADDRESS   	45
#define     PARAMETER		    	46

#define		MDM_TYPE		    	47 
#define		DIAL_TYPE		    	48
#define		PHONE_NUMBER	    	49
#define		INIT_STRING		    	50
#define		HANGUP_STRING	    	51
#define		STARTUP_STRING	    	52
#define		ESCAPE_GUARD_TIME   	53
#define		MIN_BATTERY_STRENGTH    54
#define		MIN_SIGNAL_STRENGTH	    55
#define     MAN_NUMBER              56

#define		LOCAL_CMD_WAIT_TIME	    57
#define     NW_CMD_WAIT_TIME        58
#define     APN				        59
#define     PACKET_PROTOCOL         60
#define		NWCHECK					61
#define		TERMINAL_TYPE			62

#define		HWFLOWCTRL				63
#define		SWFLOWCTRL				64
#define		RESETICHIP				65
#define		HWCHECK					66
#define		CTRLWAIT				       67
#define		SHUTDOWN_ON_CLOSE		68
#define          MULTI_USB_ENABLE                  69
#define          A_KEY_LENGTH                          26
#define          MULTI_OPER_ENV                      27
#define          GLAIN                                         28
#define          OPER_SEARCH_MODE                  29
#define          REGTRYCOUNT                           30
#define          ATTACHTRYCOUNT  31
#define     GPRSSERVICETRYCOUNT                 32

// Id for GetStatus
#define		PORT_STATUS			70 
#define		DEVICE_STATUS		71
#define		DOCK_STATUS			72
#define	  LINE_STATUS			73
#define     BATTERY_STATUS      74
#define     SIGNAL_STATUS       75
#define     ABS_BATTERY         76
#define     ABS_SIGNAL          77
#define     COVERAGE_STATUS     78
#define     PDPCONTEXT_STATUS   79
#define     REG_STATUS			80
#define	  LINK_QUALITY		    81
#define     GPRS_MONITOR            82
#define 	AT_ABS_SIGNAL		36//added by Veerendra on 06-Feb-2008 to clarify RSSI value of Kyocera CDMA Module
#define  PWR_DWN_WAIT_TIME   108
		
// IDs for ISDN parameters -added by Peter_G5(092206)
#define 		ISDN_D_CHNL_PROT		83
#define 		ISDN_B_CHNL_PROT		84
#define    	INIT_STRING_EX_1		85
#define    	INIT_STRING_EX_2		86
#define    	INIT_STRING_EX_3		87

//Id for flush info
#define     SAVE_FLUSHDATA      83

// ID For BTGetStatus
#define		BT_COMMAND_MODE		88
#define		BT_ADDRESS			89
#define		BT_FIRMWARE_VERSION	90
#define		BT_CONNECTION_STATUS	91
#define		BT_PAIRED_DEVICES_COUNT 92
#define		BT_CURRENT_DEVICE_INDEX	93

// ID for Bluetooth support
#define		BT_DISCONNECT			94
#define		BT_SEARCH_MAX			95
#define		BT_CONN_INDEX			96
#define		BT_SEARCH_TIMEOUT		97
#define		BT_CONNECT_TIMEOUT		98
#define		BT_LAN_LL				99


// Maximum Legth of different parameters

//#define MAX_RESPONSE_LEN			200 /* rajkiran, changed the value from 100 to 200 based on Shantha's input*/
#define MAX_RESPONSE_LEN			200 
#define MAX_PHNO_LENGTH				130
#define MAX_STARTUP_STR_LEN			100
#define MAX_HANGUP_STR_LEN			10
#define MAX_INIT_STR_LEN			100
#define MAX_LINE_CHECK_STR_LEN		30
#define MAX_PORT_STATUS_BUF_SIZE	4
#define	MAX_MODEL_SIZE				20
//#define	MAX_RESPONSE_CODE			70
#define  MAX_GPRS_AT_RESPONSE_LEN        1024
#define	MAX_TIME_LEN				5
#define	MAX_THRESHOLD_LEN			4
#define	SINGLE_CHAR_SIZE			1
#define MAX_PACKET_PROTOCOL_SIZE	10
#define MAX_APN_LENGTH				100
#define MAX_TERM_TYPE_SIZE			10
#define MAX_AT_CMD_LENGTH               35
#define MAX_RETRY_CNT_LENGTH           2
#define MAX_VERBOSE_RESP_LEN        256
#define MAX_VERBOSE_RESPONSE_LEN 100
#define UCL_BT_PAIR_MAX		8

// for receive with 0 - the maximum to be read in one read OS call
#define MAX_BYTES					4096

// Default UCL timeout values to be used with TCP/IP in milliseconds for Ethernet over USB
#define VALUE_NOT_USED						1
#define DEFAULT_USB_ETH_OPEN_TIMEOUT		2000
#define DEFAULT_USB_ETH_CLOSE_TIMEOUT		2000
#define DEFAULT_USB_ETH_CONNECT_TIMEOUT		VALUE_NOT_USED
#define DEFAULT_USB_ETH_DISCONNECT_TIMEOUT	VALUE_NOT_USED
#define DEFAULT_USB_ETH_SEND_TIMEOUT		150	
#define DEFAULT_USB_ETH_RECV_TIMEOUT		2 //rajkiran, changed the value from 125 to 2


// Default UCL timeout values to be used with TCP/IP in milliseconds for CDMA

#define DEFAULT_STACK_OPEN_TIMEOUT		    20000
#define DEFAULT_STACK_CLOSE_TIMEOUT		    10000
#define DEFAULT_STACK_CONNECT_TIMEOUT	    30000
#define DEFAULT_STACK_DISCONNECT_TIMEOUT	15000
#define DEFAULT_STACK_SEND_TIMEOUT		    50
#define DEFAULT_STACK_RECV_TIMEOUT		    90


#define DEFAULT_CDMA_OPEN_TIMEOUT		DEFAULT_STACK_OPEN_TIMEOUT
#define DEFAULT_CDMA_CLOSE_TIMEOUT		DEFAULT_STACK_CLOSE_TIMEOUT
#define DEFAULT_CDMA_CONNECT_TIMEOUT	DEFAULT_STACK_CONNECT_TIMEOUT
#define DEFAULT_CDMA_DISCONNECT_TIMEOUT	DEFAULT_STACK_DISCONNECT_TIMEOUT
#define DEFAULT_CDMA_SEND_TIMEOUT		DEFAULT_STACK_SEND_TIMEOUT
#define DEFAULT_CDMA_RECV_TIMEOUT		DEFAULT_STACK_RECV_TIMEOUT


// Default UCL timeout values to be used with TCP/IP in milliseconds for GPRS

#define DEFAULT_GPRS_OPEN_TIMEOUT		DEFAULT_STACK_OPEN_TIMEOUT
#define DEFAULT_GPRS_CLOSE_TIMEOUT		DEFAULT_STACK_CLOSE_TIMEOUT
#define DEFAULT_GPRS_CONNECT_TIMEOUT	DEFAULT_STACK_CONNECT_TIMEOUT
#define DEFAULT_GPRS_DISCONNECT_TIMEOUT	DEFAULT_STACK_DISCONNECT_TIMEOUT
#define DEFAULT_GPRS_SEND_TIMEOUT		DEFAULT_STACK_SEND_TIMEOUT
#define DEFAULT_GPRS_RECV_TIMEOUT		DEFAULT_STACK_RECV_TIMEOUT


// Default UCL timeout values to be used with TCP/IP in milliseconds for Landline

#define DEFAULT_LL_OPEN_TIMEOUT		    DEFAULT_STACK_OPEN_TIMEOUT
#define DEFAULT_LL_CLOSE_TIMEOUT		DEFAULT_STACK_CLOSE_TIMEOUT
#define DEFAULT_LL_CONNECT_TIMEOUT	    DEFAULT_STACK_CONNECT_TIMEOUT
#define DEFAULT_LL_DISCONNECT_TIMEOUT	DEFAULT_STACK_DISCONNECT_TIMEOUT
#define DEFAULT_LL_SEND_TIMEOUT		    DEFAULT_STACK_SEND_TIMEOUT
#define DEFAULT_LL_RECV_TIMEOUT		    DEFAULT_STACK_RECV_TIMEOUT


// Default UCL timeout values to be used with TCP/IP in milliseconds for Ethernet

#define DEFAULT_CO_ETH_OPEN_TIMEOUT		    20000
#define DEFAULT_CO_ETH_CLOSE_TIMEOUT		15000
#define DEFAULT_CO_ETH_CONNECT_TIMEOUT	    VALUE_NOT_USED
#define DEFAULT_CO_ETH_DISCONNECT_TIMEOUT	VALUE_NOT_USED
#define DEFAULT_CO_ETH_SEND_TIMEOUT		    1000
#define DEFAULT_CO_ETH_RECV_TIMEOUT		    5000


// Default UCL timeout values to be used with TCP/IP in milliseconds for WiFi

#define DEFAULT_CO_WIFI_OPEN_TIMEOUT		20000
#define DEFAULT_CO_WIFI_CLOSE_TIMEOUT		15000
#define DEFAULT_CO_WIFI_CONNECT_TIMEOUT	    VALUE_NOT_USED
#define DEFAULT_CO_WIFI_DISCONNECT_TIMEOUT	VALUE_NOT_USED
#define DEFAULT_CO_WIFI_SEND_TIMEOUT		1000
#define DEFAULT_CO_WIFI_RECV_TIMEOUT		5000

// Default UCL timeout values to be used with TCP/IP in milliseconds for WIFI over USB
// Added by Mamatha on 6/5/2006 to publish macros for timeouts used for AssignUclToTcpip()

#define DEFAULT_USB_WIFI_OPEN_TIMEOUT		100
#define DEFAULT_USB_WIFI_CLOSE_TIMEOUT		100
#define DEFAULT_USB_WIFI_CONNECT_TIMEOUT	VALUE_NOT_USED
#define DEFAULT_USB_WIFI_DISCONNECT_TIMEOUT	VALUE_NOT_USED
#define DEFAULT_USB_WIFI_SEND_TIMEOUT		VALUE_NOT_USED	
#define DEFAULT_USB_WIFI_RECV_TIMEOUT		VALUE_NOT_USED

// ISDN D-channel protocols  -  added by Peter_G5(092206)
#define ISDN_DSS1							0			//DSS1 (Euro-ISDN) (default)
#define ISDN_1TR6							1			// 1TR6 (Germany National)
#define ISDN_BC_NATL_12				5			// Bellcore National ISDN-1/2 (USA)
#define ISDN_NTT_INS_NET				6			// NTT INS-NET (Japan)
#define ISDN_AT_T_5ESS					7			// AT&T 5ESS (USA)
#define ISDN_VN_4							8			// VN-4 (France)
#define ISDN_LEASED_B1					12			// Leased line with usage of just B channel B1
#define ISDN_LEASED_B2					13			// Leased line with usage of just B channel B2
#define ISDN_LEASED_BOTH_B			14			// Leased line with usage of both B channels

// ISDN B-channel protocols	  -  added by Peter_G5(092206)
#define ISDN_V110_ASYNC				0			// V.110 asynchronous
#define ISDN_HDLC_ASYNC_TO_SYNC	3			// HDLC async-to-sync conversion (PPP asynchronous)
#define ISDN_HDLC_TRANS				4			// HDLC transparent (octets are packed into HDLC frames)
#define ISDN_BYTE_TRANS				5			// Byte transparent (raw B channel data0
#define ISDN_X75_SLP						10			// X.75 SLP
#define ISDN_V120_ASYNC				13			// V.120 asynchronous
#define ISDN_X31_B_CHNL				20			// X.31 B channel (X.25 B channel)
#define ISDN_X31_D_CHNL				21			// X.31 D channel
#define ISDN_T70NL						22			// T.70NL
#define ISDN_T90NL						23			// T.90NL
//#define ISDN_IBRO30_X31_B_CHNL		25			// IBRO30 using X.31 B channel (X.25 B channel)
//#define ISDN_IBRO30_X31_D_CHNL		26			// IBRO30 using X.31 D channel
#define ISDN_MLPPP						31			// Multilink Point-to-Point Protocol
#define ISDN_B_CH_TRANS_IOM2		40			// B channel transparently switched to IOM-2

// ISDN B-channel services  -	added by Peter_G5(101206)
//#define ISDN_NO_PROFILE					0		// No predefined profile
//#define ISDN_DATA_CALL						2		// data call
//#define ISDN_VOICE_CALL					4		// voice call

// DSS-START
// 21-Mar-2007 * DSS *	Global macros to use with OS calls

// Macros for get_port_status
#define MASK_DCD_HIGH				0x08
#define MASK_RI_HIGH				0x10
#define MASK_CTS_HIGH				0x20
#define MASK_DSR_HIGH				0x40
#define MASK_BRK_HIGH				0x80
// end get_port_status

// Macros for set_serial_lines

// The following table indicates the codes for control signals.
// These signals are used for switching the communication mode
// from command to data and data to command mode.
//  00 -BRK -RTS -DTR
//  01 -BRK -RTS +DTR
//	02 -BRK +RTS -DTR
//	03 -BRK +RTS +DTR
//	04 +BRK -RTS -DTR
//	05 +BRK -RTS +DTR
//	06 +BRK +RTS -DTR
//	07 +BRK +RTS +DTR

#define MASK_SET_BRK				0x04
#define MASK_SET_RTS				0x02
#define MASK_SET_DTR				0x01

#define MASK_BRKoff_RTSoff_DTRoff	( 0x00 )
#define MASK_BRKoff_RTSoff_DTRon	( MASK_SET_DTR )
#define MASK_BRKoff_RTSon_DTRoff	( MASK_SET_RTS )
#define MASK_BRKoff_RTSon_DTRon		( MASK_SET_RTS | MASK_SET_DTR )
// end set_serial_lines

#endif 


